Repository navigation
feat(id-caps): MCP bridge translator + end-to-end world session (#7914 criterion 1) - #13161
Merged
Merged
Conversation
…7914 BridgeSession now translates the seven v1 tool calls into F13.1 client frames, local answers rendered from the server frames observed so far, or a session close, and tracks the screen state (latest full view, pending semantic-diff changes, observed objects) that screen.read and object.inspect are answered from. presence.set is refused with a typed NoFrameMapping: the F13.1 contract carries presence only as the join itself, so there is no presence frame. pkgs/id/tests/mcp_bridge_e2e.rs proves criterion 1 of #7914 over iroh on loopback against a live world host: the agent joins, subscribes to chat_posted, reads the other participant's chat from the pushed semantic diff through screen.read (drained by the read), posts chat that lands durably in the host journal, and leaves. The facade gains an iroh-blobs dev-dependency for the test host's blob store.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #7914 — this lands criterion 1, the last open acceptance criterion. (The PR body deliberately carries the closing reference below: criteria 2 and 3 landed with PR #12917, and criterion 1 is proven by the new end-to-end test in this PR.)
What lands
The bridge translator (
id_caps::mcp_bridge, design #6300 sections 3 and 4.4).BridgeSessionnow translates each of the seven pinned v1 tool calls into the bridge driver's next step:world.join→ the agent-profilejoinframe (mirrors the native shell'sagent_join_frameshape)screen.subscribe→ thescreen_subscribeframe (region and/or event classes, validated)chat.post→ thechatframe, with the caller's stale-decision token when supplied (section 4.3)screen.read→ answered locally from the observed frames: latest full view text plus the semantic-diff changes since the previous read (reading drains them; patch views never blank the screen)object.inspect→ answered locally from theobject_changedchanges observed so farworld.leave→ToolAction::Close(presence in the F13.1 contract is connection-scoped; there is no leave frame)presence.set→ refused with the typedBridgeError::NoFrameMapping— the contract carries presence only as the join itself, so there is no presence frame to sendSession state is enforced bridge-side: session tools refuse before a join (
NotJoined), a second join is refused (AlreadyJoined), unknown tools are refused (UnknownTool), and a definition mismatch terminates translation (Terminated).The end-to-end proof (
pkgs/id/tests/mcp_bridge_e2e.rs, covered by the facade test glob in the suite registry — no registry edit needed): a liveWorldServicehost (tic-tac-toe installed) served over iroh on loopback. The agent side is driven purely by tool calls through the translator; a second participant joins raw and posts chat. The test proves: join delivers a view the bridge renders; the subscription is acked; the other participant's chat arrives as a pushedsemantic_diffand surfaces throughscreen.readexactly once; the agent'schat.postlands as the durable event at sequence 3;world.leavecloses; and the host journal (admin fixture record) holds both chats in order withcurrent_sequence3.The facade gains an
iroh-blobsdev-dependency (already in the lock as a normal dependency;Cargo.lockunchanged) for the test host's in-memory blob store.Verification
cargo test -p id-caps— 216 lib tests (10 new translator unit tests) + 3 surface tests, all green; the surface suite gains a coverage test: every surface tool translates or names its missing mapping, and the five forbidden non-tools never translate.cargo test --test mcp_bridge_e2e— 1 passed (2.11s).cargo fmt— the changed files are fmt-clean (the workspace has 49 pre-existing fmt diffs in unrelated files on main; untouched here).cargo clippy -p id-caps --all-targets— no findings in the new code; the run still fails on 26 pre-existing deny-lint errors inlibrary_attach.rstest code and one pre-existing warning indefinition_hash, both untouched by this PR and present on main.Closes #7914
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.